var express = require('express');
var router = express.Router();

var data = [{
    custID: '0805',
    custName: '乌东单丛',
    exposure_num: '13313',
    click_num: '31351',
    click_percent: '1.4%',
    click_price: '0.5',
    consume: '100'
  },
  {
    custID: '0806',
    custName: '铁观音',
    exposure_num: '12300',
    click_num: '4564',
    click_percent: '100%',
    click_price: '0.5',
    consume: '100'
  },
  {
    custID: '8067',
    custName: '水仙',
    exposure_num: '1545440',
    click_num: '451451456',
    click_percent: '12%',
    click_price: '0.5',
    consume: '100'
  },
  {
    custID: '1066',
    custName: '普洱',
    exposure_num: '45354',
    click_num: '1212313',
    click_percent: '3%',
    click_price: '0.5',
    consume: '100'
  },
  {
    custID: '4665',
    custName: '菊花',
    exposure_num: '453321321',
    click_num: '554656',
    click_percent: '20%',
    click_price: '0.5',
    consume: '100'
  }
];
// http://localhost:3000/api/ad?
// page=1&size=50&name=&status=0&time=2017-12-29+-+2017-12-29
router.get('/', function (req, res, next) {
  var rst = {
    code: 10004,
    msg: 'success',
    data: {
      current_page: 1,
      total: 5,
      per_page: 10,
      data: data
    }
  };
  res.json(rst);
});

module.exports = router;
